INCLUDE(FindPackageHandleStandardArgs)
INCLUDE(HandleLibraryTypes)

SET(Player_IncludeSearchPaths
  /usr/include/player-3.0/
  /usr/local/include/player-3.0/
  /opt/local/include/player-3.0/
  /usr/include/player-2.0/
  /usr/local/include/player-2.0/
  /opt/local/include/player-2.0/

)

SET(Player_LibrarySearchPaths
  /usr/lib/
  /usr/local/lib/
  /opt/local/lib/
)

FIND_PATH(PLAYER_INCLUDE_DIR libplayerc++/playerc++.h
  PATHS ${Player_IncludeSearchPaths}
)
FIND_LIBRARY(PLAYER_LIBRARY_OPTIMIZED
  NAMES playerc++
  PATHS ${Player_LibrarySearchPaths}
)


# Handle the REQUIRED argument and set the <UPPERCASED_NAME>_FOUND variable
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Player "Could NOT find Player. It is only a requirement for some processes. Its safe to continue."
  PLAYER_LIBRARY_OPTIMIZED
  PLAYER_INCLUDE_DIR
)

HANDLE_LIBRARY_TYPES(PLAYER)

MARK_AS_ADVANCED(
  PLAYER_INCLUDE_DIR
  PLAYER_LIBRARY_OPTIMIZED
)
